
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<html>
<head>
    <title><fmt:message code="main.administratorset" /></title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" href="/css/meeting/setLeader.css">
    <link rel="stylesheet" href="/lib/layer/skin/default/layer.css">
    <link rel="stylesheet" href="/lib/laydate/need/laydate.css">
    <link rel="stylesheet" href="/lib/pagination/style/pagination.css">
    <%--<link rel="stylesheet" href="/css/base.css">--%>
    <script type="text/javascript" src="/js/jquery/jquery-1.9.1.js"></script>
    <script src="/lib/layer/layer.js?20201106"></script>
    <script src="/js/base/base.js"></script>
    <script src="/lib/laydate/laydate.js"></script>
    <script src="/lib/pagination/js/jquery.pagination.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<style>
    table tr td a {
        font-size: 14px;
        color: #2b7fe0;
    }
</style>
<body style="font-family: 微软雅黑;">
<div class="headTop">
    <div class="headImg">
        <img src="/img/commonTheme/${sessionScope.InterfaceModel}/icon_manageUser.png" alt="">
    </div>
    <div class="divTitle">
        视频会议设置
    </div>
</div>
<div class="main">
    <div class="pagediv" id="already" style="margin: 0 auto;width: 97%;margin-top: 50px;">
        <table style="background: white; width:50%;">
            <tr>
                <td style="color: #2F5C8F!important;font-weight: bold;text-align: center; font-family:微软雅黑;font-size: 13pt; height: 40px;border-bottom: solid 1px #cccccc;">
                    服务器设置
                </td>
            </tr>
            <tr>
                <td>
                    <div style="margin: 30px auto;">
                        <span style="margin-left: 20px; width: 25%;">服务器设置:</span>
                        <div style="margin-left: 20%; display: inline-block">
                            http://
                            <input style="margin-left: 10px;" placeholder="请输入服务器地址" type="text" id="super_ip" name="super_pass" class="inp" size="30">
                            :
                            <input style="margin-left: 10px;" placeholder="请输入端口号" type="text" id="super_port" name="super_pass" class="inp" size="10">
                        </div>
                    </div>
                </td>
            </tr>
            <td>
                <div style="margin: 30px auto;">
                    <span style="margin-left: 20px; width: 25%;">企业ID:</span>
                    <div style="margin-left: 28%; display: inline-block">
                        <input style="margin-left: 10px;" placeholder="请输入企业ID" type="text" id="COMPANY_ID" name="super_pass" class="inp" size="30">
                    </div>
                </div>
            </td>
            </tr>
            <tr>
                <td style="text-align: center;height: 50px; border-top: solid 1px #cccccc;">
                    <div class="btnSure">
                        <span style="margin-left: 22px;" id="okbtn"><fmt:message code="global.lang.ok" /></span>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</div>
</div>

<script>
    var id=0;

    //页面加载
    $(function () {
        $.ajax({
            url: "/video/getvideo",
            type: "get",
            data: {
                id: "1"
            },
            dataType: 'json',
            success: function (res) {
                var obj=res.object;
                if (obj!=undefined && res.flag){
                    id=obj.id;
                    $('#super_ip').val(obj.server);
                    $('#super_port').val(obj.port);
                    $('#COMPANY_ID').val(obj.companyId);
                }
            }
        });
    });

    //确定点击事件
    $('#okbtn').click(function(){
        $.ajax({
            url: "/video/editvideo",
            type: 'get',
            dataType: "JSON",
            data: {
                id:id,
                server:$('#super_ip').val(),
                port:$('#super_port').val(),
                companyId:$('#COMPANY_ID').val()
            },
            success:function (data){
                if(data.flag==true){
                    layer.msg('<fmt:message code="diary.th.modify" />', {icon: 1});
                }else{
                    layer.msg('<fmt:message code="meet.th.SaveFailed" />', {icon: 6});
                }
            }
        })
    });
</script>
</body>
</html>
